package com.ukao.steward.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.ukao.steward.R;
import com.ukao.steward.base.ListBaseAdapter;
import com.ukao.steward.base.SuperViewHolder;
import com.ukao.steward.bean.BankCardListBena;

import java.util.List;

public class BankCardAdapter extends ListBaseAdapter<BankCardListBena.ListBean> {




    public BankCardAdapter(Context mContext, List<BankCardListBena.ListBean> datas) {
        super(mContext, datas);
        this.mContext = mContext;
    }

    @Override
    public int getLayoutId() {
        return R.layout.adapter_bank_card;
    }


    @Override
    public void onBindItemHolder(SuperViewHolder holder, final int position) {
        BankCardListBena.ListBean item = mDataList.get(position);
        TextView accountName = holder.getView(R.id.accountName);
        ImageView checkBox = holder.getView(R.id.checkBox);
        TextView accountNo = holder.getView(R.id.accountNo);
        accountName.setText(item.getAccountName());
        accountNo.setText(item.getAccountNo());
        if (item.isCheck()){
            checkBox.setVisibility(View.VISIBLE);
        }else{
            checkBox.setVisibility(View.GONE);
        }
    }


}

